# -*- coding: utf-8 -*-
# @Time    : 2024/9/10 21:35
# @Author  : 荒
# @FileName: init_user.py
# @Software: PyCharm
import os
import sys
import django

base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# sys.path.append(base_dir)
os.environ.setdefault("DJANGO_SETTINGS_MODULE","tracer.settings")
django.setup()

from web import models
# 往数据库添加数据，链接数据库、操作、关闭链接
models.UserInfo.objects. create(username="陈硕",email='chengshuo@live.com',
                                mobile_phone='13838383838',password='123123')